package com.paper.tiger.easy.rpc.c.client;

import com.paper.tiger.easy.rpc.resource.TestInter;
import com.paper.tiger.easy.rpc.s.client.client.ProxyFactoty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * [简要描述]:
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/6/25 09:31
 * @since JDK 1.8
 */
@RestController
@RequestMapping("demo")
public class DemoController
{
    @Autowired
    private TestInter testInter;

    @GetMapping("test")
    public String test(String name) {


        String aaa = testInter.test(name);

        return aaa;
    }

    /**
     *  测试异步调用
     * @param name
     * @return
     */
    @GetMapping("test1")
    public String test1(String name) {


        testInter.testAsync("aaa");

        System.out.println("调用完毕");

        return name;
    }

}
